package com.coolw.design.pattern.behavior.strategy;

/**
 * 汽车环境类
 *
 * @author coolw
 * @date 2019-12-25 12:46
 */
public class CarContext {

    private final CarStrategy carStrategy;

    public CarContext(CarStrategy carStrategy) {
        this.carStrategy = carStrategy;
    }

    public void buyCarStrategy() {
        carStrategy.buyCar();
    }
}
